import request from '@/utils/request'

let baseMapping = "/exam_service/reading/";

export default {

  // 分页获取阅读信息
  getList(current, limit, read) {
    return request({
      url: baseMapping + `query/${current}/${limit}`,
      method: 'post',
      data: read
    })
  },

  // 通过id获取阅读信息
  getRead(id) {
    return request({
      url: baseMapping + `getReadingById/${id}`,
      method: 'get'
    })
  },

  // 通过id获取阅读信息
  delete(id) {
    return request({
      url: baseMapping + `deleteReading/${id}`,
      method: 'get'
    })
  },

  // 添加阅读信息
  add(read) {
    return request({
      url: baseMapping + `addReading`,
      method: 'post',
      data: read
    })
  },

  // 修改阅读信息
  update(read) {
    return request({
      url: baseMapping + `updateReading`,
      method: 'post',
      data: read
    })
  }
}
